
#version 330 core
out vec3 color;
smooth in vec3 uv[14];
uniform sampler2D tex;

vec3 pixel(int i)
{
	return textureLod(tex, uv[i].xy, uv[i].z).rgb;
}

vec3 blur(int off)
{
	const vec4 gaussion = vec4(20, 15, 6, 1) / 64;
	return mat4x3(
			pixel(off  ),
			pixel(off+1) + pixel(off+2),
			pixel(off+3) + pixel(off+4),
			pixel(off+5) + pixel(off+6))
		* gaussion;
}

void main()
{
	color = blur(0) + blur(7);
}


